<include file="Public/header" />
<div class="container share-note-info">
    <div class="row">
        <!-- <div class="col-md-12"> -->
            <if condition="$noteInfoFlag eq 1">
                <div class="col-md-5">
                    <img src="__PUBLIC__/uploads/markerimage/<{$noteInfo[0].imagesrc}>" alt="<{$noteInfo[0]['notename']}>" class="img-rounded" width="100%">
                </div>
                <div class="col-md-1 visitable-lg"></div>
                <div class="col-md-6 note-info">
                    <div class="list-group">
                       <li class="list-group-item note-name">
                           <if condition="$userNoteCollectFlag eq 1">
                               <i  class="fa fa-heart fa-a <{$noteInfo[0]['noteid']}>-id" title="已收藏" onclick="noteCollectWork(<{$usersessionid}>,<{$noteInfo[0]['noteid']}>,'<{$noteInfo[0]['usernickname']}>')"></i>
                           <else />
                               <i  class="fa fa-heart-o fa-a <{$noteInfo[0]['noteid']}>-id" title="点击收藏" onclick="noteCollectWork(<{$usersessionid}>,<{$noteInfo[0]['noteid']}>,'<{$noteInfo[0]['usernickname']}>')"></i>
                           </if> ： <font><{$noteInfo[0]['notename']}></font>
                           <if condition="$noteInfo[0]['userid'] eq $usersessionid">
                           <a href="__CONTROLLER__/myNoteDelete/id/<{$noteInfo[0].noteid}>" onclick="javascript:return myNoteDeleteConfirm();"><i class="fa fa-trash fa-a trash-a"></i><small> 删除</small></a>
                           </if>
                           <if condition="$noteInfo[0]['isshare'] eq 1">
                               <button class="btn btn-default btn-xs pull-right disabled">已分享</button>
                               <elseif condition="$noteInfo[0]['userid'] eq $usersessionid"/>
                               <button class="btn btn-success btn-xs pull-right"><i class="fa fa-share-alt"></i> 分享 </button>
                           </if>
                       </li>
                       <li class="list-group-item" title="分享用户"><i class="fa fa-user" ></i> ： <a href="__APP__/Home/Index/userHome/user/<{$noteInfo[0]['usernickname']}>/"><{$noteInfo[0]['usernickname']}></a></li>
                       <li class="list-group-item" title="分享时间"><i class="fa fa-clock-o" ></i> ： <{$noteInfo[0]['notetime']}></li>
                       <li class="list-group-item" title="地址"><i class="fa fa-automobile" ></i> ： <{$noteInfo[0]['noteaddress']}></li>
                       <li class="list-group-item">
                           <span>
                               <i class="fa fa-comments" title="讨论次数"></i> ： <{$noteInfo[0]['notediscusscount']}>
                           </span>
                           <span><font id="collectWarningNoPersonal" color="red" class="hidden">不能收藏自己的记录！</font></span>
                           <span class="pull-right">
                                <if condition="$userNoteCollectFlag eq 1">
                                   <small id="<{$noteInfo[0]['noteid']}>small">取消收藏 → </small>
                                   <i class="fa fa-heart fa-a <{$noteInfo[0]['noteid']}>-id" title="取消收藏" onclick="noteCollectWork(<{$usersessionid}>,<{$noteInfo[0]['noteid']}>,'<{$noteInfo[0]['usernickname']}>')"></i>
                               <else />
                                   <small id="<{$noteInfo[0]['noteid']}>small">点击收藏 → </small>
                                   <i class="fa fa-heart-o fa-a <{$noteInfo[0]['noteid']}>-id" title="点击收藏" onclick="noteCollectWork(<{$usersessionid}>,<{$noteInfo[0]['noteid']}>,'<{$noteInfo[0]['usernickname']}>')"></i>
                               </if>  <small>&nbsp; • &nbsp;  </small><font id="<{$noteInfo[0]['noteid']}>font"><{$noteInfo[0]['notecollectcount']}></font>
                               </li>
                           </span>
                    </div>
                </div>
            <else />
                <div class="alert alert-danger alert-lg text-center" role="alert">
                    <h2><i class="fa fa-ban"></i> 内容不存在</h2>
                    <small>由于未知原因导致信息查看出现错误。</small>
                </div>
            </if>
        <!-- </div> -->
        <if condition="$noteInfoFlag eq 1">
            <div class="col-md-9 col-xs-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4>相关讨论 <small>  &nbsp; • &nbsp;  <{$noteDiscussCount}> 条  &nbsp; - &nbsp;  第 <{$noteDiscussPage}> 页</small></h4>
                    </div>
                    <if condition="$noteDiscussFlag eq 0">
                        <div class="panel-body text-center">
                            <h3 ><i class="fa fa-info-circle"></i> 暂无评论</h3>
                        </div>
                    <else />
                        <div class="list-group">
                             <volist name="noteDiscussRows" id="vo">
                                <li class="list-group-item note-discuss">
                                    <if condition="$vo.isdelete eq 1">
                                        <div class="media">
                                            <div class="media-body">
                                            <h4 ><font color="#BBB"><s>该评论已删除</s></font></h4>
                                            </div>
                                        </div>
                                    <else />
                                        <div class="media" id="<{$vo.discussid}>-media-div">
                                            <div class="media-left ">
                                                <a href="__APP__/Home/Index/userHome/user/<{$vo.usernickname}>/">
                                                    <img src="__PUBLIC__/uploads/user/<{$vo.userlogo}>" class="media-object img-circle" alt="">
                                                </a>
                                            </div>
                                            <div class="media-body">
                                                <a href="__APP__/Home/Index/userHome/user/<{$vo.usernickname}>/" class="media-heading"><font><{$vo.usernickname}></font></a>
                                                <font class="note-discuss-time">&nbsp; • &nbsp;<{$vo.discusstime}></font>
                                                <span class="pull-right">
                                                    <if condition="$vo.usernickname eq $usersessionname">
                                                         <i onclick="noteDiscussDelete(<{$usersessionid}>,<{$vo.discussid}>)" class="fa fa-trash-o fa-a"></i> &nbsp; • &nbsp;
                                                    </if>
                                                        <if condition="$vo.discusslike eq 1">
                                                          <i id="<{$vo.discussid}>" class="fa fa-thumbs-up fa-a"onclick="noteDiscussLike(<{$usersessionid}>,<{$vo.discussid}>)"></i>
                                                        <else /><i id="<{$vo.discussid}>" class="fa fa-thumbs-o-up fa-a" onclick="noteDiscussLike(<{$usersessionid}>,<{$vo.discussid}>)"></i>
                                                        </if> <span id="<{$vo.discussid}>span"><{$vo.discusslikecount}></span>
                                                </span>
                                                <div class="media-meta">
                                                    <p><{$vo.discusstext}></p>
                                                </div>
                                            </div>
                                            <div class="media-right media-middle">
                                                <a href="#"><span class="badge" ><{$vo.notediscusscount}></span></a>
                                            </div>
                                        </div>
                                    </if>
                                </li>
                            </volist>
                        </div>
                        <div class="panel-footer">
                            <ul class="pagination ">
                              <li> <{$show}></li>
                           </ul>
                        </div>
                    </if>
                </div><!--discuss list panel end-->
            <if condition="$userLoginFlag eq 1">
                <div id="addDiscuss" name="addDiscuss">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h4>新评论</h4>
                        </div>
                        <form action="__CONTROLLER__/noteAddDiscuss/" method="post" accept-charset="utf-8">
                            <textarea name="content" class="form-control content" rows='10'></textarea>
                            <input type="hidden" name="noteid" value="<{$noteInfo[0]['noteid']}>">
                            <div class="panel-footer">
                                <button type="submit" class="btn btn-info">新增评论</button>
                            </div>
                        </form>
                    </div>
                </div> <!--add end-->
            <else />
             <div class="col-md-9 col-xs-12">
               <div class="panel panel-default">
                  <div class="panel-body">
                    需要先 <a href="__APP__/Home/User/index">登录</a> 才能回复。
                  </div>
                </div>
              </div>
            </if>
      </div><!--div discuss end-->
      <div class="col-md-3 col-xs-12 ">
        <div class="addDiscussBtn">
                <a href="#addDiscuss" class="btn btn-primary btn-lg">添加评论</a>
        </div> 
      </div><!--right div end-->
      <div class="col-md-3 col-xs-12 note-other-info">
          <h5>其他相关</h5>
          <div class="list-group-item note-other-text">
            <if condition="$noteInfo[0]['noteohterstrlen'] eq 0">
              <div class="text-center">
                  <i class="fa fa-warning text-center"></i>
                  <span class="text-center">暂无其他信息</span>
              </div>
            <else/>
            <div >
              <p><{$noteInfo[0]['noteother']}></p>
            </div>
            </if>
          </div>
      </div><!--right div end-->
         <else />
      </if>
    </div><!--row end-->
</div><!--container end-->

<include file="Public/footer"/>

